#ifndef VIEW_H_
#define VIEW_H_

#include <string>

using namespace std;

class View{
protected:
	string id;
	float near;
	float far;

public:
	View(string ID, float n, float f):id(ID), near(n), far(f){
		setNear(n);
		setFar(f);
	};

	float getNear() const {return near;};
	float getFar() const {return far;};
	void setNear(float n) {near = n;};
	void setFar(float f) {far = f;};
};

class Perspective:public View{
	float angle;
	float fromX, fromY, fromZ;
	float toX, toY, toZ;

public:
	Perspective(string ID, float n, float f, float a, float fx, float fy, float fz, float tx, float ty, float tz): 
		View(ID, n, f), angle(a), fromX(fx), fromY(fy), fromZ(fz), toX(tx), toY(ty), toZ(tz){
		setAngle(a);
		setFromX(fx);
		setFromY(fy);
		setFromZ(fz);
		setToX(tx);
		setToY(ty);
		setToZ(tz);
	};

	float getAnfle() const {return angle;};
	float getFromX() const {return fromX;};
	float getFromY() const {return fromY;};
	float getFromZ() const {return fromZ;};
	float getToX() const {return toX;};
	float getToY() const {return toY;};
	float getToZ() const {return toZ;};
	void setAngle(float a) {angle = a;};
	void setFromX(float fx) {fromX = fx;};
	void setFromY(float fy) {fromY = fy;};
	void setFromZ(float fz) {fromZ = fz;};
	void setToX(float tx) {toX = tx;};
	void setToY(float ty) {toY = ty;};
	void setToZ(float tz) {toZ = tz;};
};

class Ortho:public View{
	float left, right;
	float top, bottom;

	Ortho(string ID, float n, float f, float l,float r, float t, float b):
		View(ID, r, f), left(l), right(r), top(t), bottom(b){};

	float getLeft() const {return left;};
	float getRigh() const {return right;};
	float getTop() const {return top;};
	float getBottom() const {return bottom;};
	void setLeft(float l) {left = l;};
	void setRight(float r) {right = r;};
	void setTop(float t) {top = t;};
	void setBottom(float b) {bottom = b;};
};
#endif